4KHDR[磁].js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. var rule = {
  2. title:'4KHDR[磁]',
  3. host:'https://www.4khdr.cn',
  4. homeUrl: "/forum.php?mod=forumdisplay&fid=2&page=1",
  5. url: '/forum.php?mod=forumdisplay&fid=2&filter=typeid&typeid=fyclass&page=fypage',
  6. filter_url:'{{fl.class}}',
  7. filter:{
  8. },
  9. searchUrl: '/search.php#searchsubmit=yes&srchtxt=**;post',
  10. searchable:2,
  11. quickSearch:1,
  12. filterable:0,
  13. headers:{
  14. 'User-Agent': 'PC_UA',
  15. 'Cookie':'hvLw_2132_saltkey=x89cF7aD; hvLw_2132_lastvisit=1691840602; hvLw_2132_visitedfid=2; hvLw_2132_sendmail=1; _clck=hvltzs|2|fe4|0|1234; hvLw_2132_seccodecS=5681.04cfefe37df21abe97; hvLw_2132_ulastactivity=1691933173%7C0; hvLw_2132_auth=e9f3f37HqkcIBFlhm8r%2FqsQJNVKy9x1%2BRzROV4QROggK5CuZMQ3pmPzm9JwrPr%2FCkV7PzN7Nvt0yW1yEQXQjasm3AQ; hvLw_2132_sid=0; hvLw_2132_st_t=99213%7C1691933177%7C1fa4611ff255a89678127a126372871e; hvLw_2132_forum_lastvisit=D_2_1691933177; hvLw_2132_lastact=1691933194%09search.php%09forum; _clsk=fhws28|1691933195886|4|1|r.clarity.ms/collect',
  16. },
  17. timeout:5000,
  18. class_name: "4K电影&4K美剧&4K华语&4K动画&4K纪录片&4K日韩印&蓝光电影&蓝光美剧&蓝光华语&蓝光动画&蓝光日韩印",
  19. class_url:"3&8&15&6&11&4&29&31&33&32&34",
  20. play_parse:false,
  21. lazy:'',
  22. limit:6,
  23. 推荐:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  24. 一级:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  25. 二级:{
  26. title:"#thread_subject&&Text",
  27. img:"img.zoom&&src",
  28. desc:'td[id^="postmessage_"] font&&Text',
  29. content:'td[id^="postmessage_"] font&&Text',
  30. tabs:`js:
  31. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  32. TABS=[]
  33. var d = pdfa(html, 'table.t_table');
  34. let magnetIndex=0;
  35. let aliIndex=0;
  36. d.forEach(function(it) {
  37. let burl = pdfh(it, 'a&&href');
  38. log("burl >>>>>>" + burl);
  39. if (burl.startsWith("https://www.aliyundrive.com/s/")){
  40. let result = 'aliyun' + aliIndex;
  41. aliIndex = aliIndex + 1;
  42. TABS.push(result);
  43. }
  44. });
  45. d.forEach(function(it) {
  46. let burl = pdfh(it, 'a&&href');
  47. log("burl >>>>>>" + burl);
  48. if (burl.startsWith("magnet")){
  49. let result = 'magnet' + magnetIndex;
  50. magnetIndex = magnetIndex + 1;
  51. TABS.push(result);
  52. }
  53. });
  54. log('TABS >>>>>>>>>>>>>>>>>>' + TABS);
  55. `,
  56. lists:`js:
  57. log(TABS);
  58. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  59. LISTS = [];
  60. var d = pdfa(html, 'table.t_table');
  61. TABS.forEach(function(tab) {
  62. log('tab >>>>>>>>' + tab);
  63. if (/^aliyun/.test(tab)) {
  64. let targetindex = parseInt(tab.substring(6));
  65. let index = 0;
  66. d.forEach(function(it){
  67. let burl = pdfh(it, 'a&&href');
  68. if (burl.startsWith("https://www.aliyundrive.com/s/")){
  69. if (index == targetindex){
  70. let title = pdfh(it, 'a&&Text');
  71. log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  72. //burl = "http://127.0.0.1:9978/proxy?do=ali&type=push&url=" + encodeURIComponent(burl);
  73. burl = "push://" + encodeURIComponent(burl);
  74. log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  75. let loopresult = title + '$' + burl;
  76. LISTS.push([loopresult]);
  77. }
  78. index = index + 1;
  79. }
  80. });
  81. }
  82. });
  83. TABS.forEach(function(tab) {
  84. log('tab >>>>>>>>' + tab);
  85. if (/^magnet/.test(tab)) {
  86. let targetindex = parseInt(tab.substring(6));
  87. let index = 0;
  88. d.forEach(function(it){
  89. let burl = pdfh(it, 'a&&href');
  90. if (burl.startsWith("magnet")){
  91. if (index == targetindex){
  92. let title = pdfh(it, 'a&&Text');
  93. log('title >>>>>>>>>>>>>>>>>>>>>>>>>>' + title);
  94. log('burl >>>>>>>>>>>>>>>>>>>>>>>>>>' + burl);
  95. let loopresult = title + '$' + burl;
  96. LISTS.push([loopresult]);
  97. }
  98. index = index + 1;
  99. }
  100. });
  101. }
  102. });
  103. `,
  104. },
  105. 一级:'ul#waterfall li;a&&title;img&&src;div.auth.cl&&Text;a&&href',
  106. 搜索:'div#threadlist ul li;h3&&Text;;p:eq(3)&&Text;a&&href;p:eq(2)&&Text',
  107. 预处理:`
  108. if (rule_fetch_params.headers.Cookie.startsWith("http")){
  109. rule_fetch_params.headers.Cookie=fetch(rule_fetch_params.headers.Cookie);
  110. setItem(RULE_CK,cookie);
  111. };
  112. log('4khdr cookie>>>>>>>>>>>>>>>' + rule_fetch_params.headers.Cookie);
  113. let new_host='https://www.4khdr.cn/search.php';
  114. let new_html=request(new_host);
  115. pdfh=jsp.pdfh;pdfa=jsp.pdfa;pd=jsp.pd;
  116. let formhash = pdfh(new_html, 'input[name="formhash"]&&value');
  117. log("formhash>>>>>>>>>>>>>>>" + formhash);
  118. rule_fetch_params.formhash = formhash;
  119. `,
  120. }